package acm.广东工业大学新生赛;

import java.util.Scanner;

public class B {
    static class Node{
        boolean pass;
        int count;
    }

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        Node[] nodes=new Node[sc.nextInt()];
        for (int i = 0; i < nodes.length; i++) {
            nodes[i]=new Node();
        }
        int ac=0;
        int count=0;
        int n=sc.nextInt();
        sc.nextLine();
        while (n-- > 0) {
            String[] str = sc.nextLine().split(" ");
            int i = Integer.parseInt(str[0]);
            if (nodes[i-1].pass){
                continue;
            }
            if ("AC".equals(str[1])){
                count+=nodes[i-1].count;
                nodes[i-1].pass=true;
                ac++;
            }else {
                nodes[i-1].count++;
            }
        }
        System.out.println(ac+" "+count);
    }
}